import fetch from '@/requests/fetch'
// 验证手机号
export const verifyPhone = (data) => fetch('get', '/verifyPhone', data)
//商品详情
export const getBySpuId = (data) => fetch('get', '/api/erp/sassProducts/getBySpuId', data)
// 获取购物车
export const getCartList = (data) => fetch('get', '/api/erp/sassCartSys/getCart', data)
// 添加购物车
export const addCartFun = (data) => fetch('post', '/api/erp/sassCartSys/add', data)
// 修改购物车数量
export const updateCart = (data) => fetch('post', '/api/erp/sassCartSys/update', data)
// 清空购物车
export const clearCart = (data) => fetch('get', '/api/erp/sassCartSys/clearCart', data)
// 创建订单
export const createOrder = (data) => fetch('post', '/api/erp/sassOrders/add', data)
// 现金支付
export const purchaseByCash = (data) => fetch('post', '/api/erp/sassOrders/purchaseByCash', data)
// 后台付款码支付
export const barcodePayment = (data) => fetch('post', '/api/erp/sassOrders/barcodePayment', data)
// 删除订单/api/erp/sassOrders/deleteBySys
export const deleteOrder = (data) => fetch('delete', `/api/erp/sassOrders/deleteBySys?orderId=${data.orderId}&deptId=${data.deptId}`, data)
